/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ResourceManager;

import GameCore.ResourceSetting;
import GameObject.Button;
import GameObject.Card;
import GameObject.Label;
import GameObject.VisibleGameObject;

/**
 *
 * @author NGUYEN VAN TAM
 */
public class LabelManager extends EntityManager{
    @Override
    public void InitPrototype()
    {
        _nprototype = ResourceSetting.Label_nLabel;
        _prototype = new Label[_nprototype];

        for (int i = 0; i < _nprototype; i++)
        {
            _prototype[i] = new Label();
            ((Label)_prototype[i]).Init(ResourceSetting.LabelSprite(i),ResourceSetting.Card_Width,ResourceSetting.Card_Height, ResourceSetting.LabelStrResource(i),ResourceSetting.Label_iSprite);
        }
    }
    
    @Override
    public VisibleGameObject CreateObject(int index)
    {
        if ((index < 0) || (index >= _nprototype))
        {
            return null;
        }
        return _prototype[index].Clone();
    } 
}
